#include<bits/stdc++.h>
#define int long long
#define N 200005
using namespace std;
int n,q;
int s,a[N];
int f[N][2];
void sol(){
    scanf("%lld",&a[n]);
    if(a[n]>1e6){
        printf("%lld\n",a[n]-s+a[1]+a[1]);
        return;
    }
    f[n-1][0]=a[n-1]-a[n];f[n-1][1]=a[n]-a[n-1];
    int mx=f[n-1][1],mn=f[n-1][0];
    for(int i=n-2;i>=1;i--){
        f[i][0]=mx+a[i];
        f[i][1]=mn-a[i];
        mx=max(mx-a[i],f[i][1]);
        mn=min(mn+a[i],f[i][0]);
    }
    printf("%lld\n",f[1][0]);
}
signed main(){
    freopen("pockets.in","r",stdin);
    freopen("pockets.out","w",stdout);
    scanf("%lld",&n);
    for(int i=1;i<n;i++) scanf("%lld",&a[i]),s+=a[i];
    scanf("%lld",&q);
    while(q--) sol();
    return 0;
}